package com.ruoyi.applet.mapper;


import com.ruoyi.applet.domain.Order;
import com.ruoyi.applet.domain.OrderStatus;
import com.ruoyi.applet.domain.vo.OrderByUserId;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * 订单列表Mapper接口
 *
 * @author ruoyi
 * @date 2024-12-13
 */
public interface OrderMapper
{
    List<Order> selectOrderUerIdOrderList(@Param("usrId") Long usrId);

    OrderByUserId selectOrderUerIdList(@Param("usrId") Long usrId,@Param("productSpecValueId") Long productSpecValueId);

    List<OrderByUserId> selectOrderProductSpecValueIdList(@Param("usrId") Long usrId, @Param("orderStatus") Long orderStatus);

    List<OrderStatus> selectAllByOrderIdStatusList();

    OrderByUserId selectByOrderStatusInteger(@Param("usrId") Long usrId,@Param("orderStatus") Long orderStatus);

    List<OrderByUserId> selectByOrderStatusList(@Param("usrId") Long usrId);

    Integer updateByOrderIdInteger(@Param("usrId") Long usrId,@Param("orderId") String orderId);

    Integer updateOrderIdAndOrderUerIdInteger(@Param("usrId") Long usrId,@Param("status") Long status,@Param("orderId") String orderId);

    OrderByUserId selectAllByOrderIdAndOrderUerIdOrderByUserId(@Param("usrId") Long usrId,@Param("orderId") String orderId);

    Integer insertAllInteger(@Param("usrId") Long usrId,@Param("orderId") String orderId,
                             @Param("orderTotal") String orderTotal,@Param("orderReceiverName") String orderReceiverName,
                             @Param("orderReceiverPhone") String orderReceiverPhone,@Param("orderReceiverAddress") String orderReceiverAddress,
                             @Param("orderGoodsId") Long orderGoodsId,@Param("orderNumber") Long orderNumber,
                             @Param("orderTransactionId") String orderTransactionId);

    Order selectAllByOrderGoodsIdCount(@Param("usrId") Long usrId,@Param("orderGoodsId") Long orderGoodsId);

    Integer updateOrderGoodsIdAndOrderUerIdInteger(@Param("usrId") Long usrId,@Param("orderId") String orderId,@Param("orderNumber") Long orderNumber);

    Integer deleteByOrderIdInteger(@Param("usrId") Long usrId,@Param("orderId") String orderId);

    Order selectOrderUerIdOrder(@Param("orderId") String orderId);
    
    Integer updateAllByOrderIdInteger(@Param("orderStatus") Long orderStatus,@Param("orderId") String orderId);

    Integer updateOrderIdAndOrderUerId(@Param("orderId") String orderId, @Param("usrId") Long usrId, @Param("price")BigDecimal price);

    Order selectOrderNotesAndOrderUerId(@Param("usrId") Long usrId,@Param("spikesGoodId") Long spikesGoodId);

    Order selectOrderNotesOrder(@Param("orderId") String orderId);
}
